<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui">
	<ui:composition template="/templates/padrao.xhtml">
		<ui:define name="barraTitulo">Cadastro de Tipo Ve&iacute;culo</ui:define>		
		<ui:define name="conteudo">
			<h:form id="formTipoVeiculo">
				<p:growl id="messages"/>
				<p:tabView id="divTabView">
					<p:tab title="Cadastro">
						<h:panelGrid columns="3" columnClasses="width150 alinhaDir, width500">
							<h:outputText value=""/>
							<h:outputText value="Os campos com asterisco (*) s&atilde;o de preenchimento obrigat&oacute;rio." styleClass="campoObrigatorio" />
							<h:outputText value=""/>
							<h:outputText value="Descri&ccedil;&atilde;o:" styleClass=""/>
							<h:column>
								<h:inputText  value="#{controleTipoVeiculo.tipoVeiculo.descricao}" requiredMessage="Campo [DESCRICAO] obrigat&oacute;rio" size="80"/>
							</h:column>	
							<h:outputText value="(*)" styleClass="campoObrigatorio" />
							<h:outputText value=""/>
							<h:column>
								<p:panel header="Acess&oacute;rios">
									<h:panelGrid columns="3" columnClasses="width200,  , width200" >
										<h:column />									
											<p:pickList value="#{controleTipoVeiculo.listaAcessorios}" 
												var="acessorio" 
												itemLabel="#{acessorio.descricao}" 
												itemValue="#{acessorio}" 
												converter="converteAcessorio"
												iconOnly="true">
												<f:facet name="sourceCaption">Todos</f:facet>  
												<f:facet name="targetCaption">Selecionados</f:facet> 
											</p:pickList>
										<h:column />
									</h:panelGrid>					
								</p:panel>
							</h:column>
							<h:outputText value=""/>
							<h:outputText value=""/>
							<h:column>
								<p:panel header="Informa&ccedil;&atilde;o Adicional">
									<h:panelGrid columns="3" columnClasses="width200,  , width200" >
										<h:column />									
											<p:pickList value="#{controleTipoVeiculo.listaInformacao}" 
												var="informacao" 
												itemLabel="#{informacao.descricao}" 
												itemValue="#{informacao}" 
												converter="converteInformacaoAdicional"
												iconOnly="true">
												<f:facet name="sourceCaption">Todos</f:facet>  
												<f:facet name="targetCaption">Selecionados</f:facet> 
											</p:pickList>
										<h:column />
									</h:panelGrid>					
								</p:panel>
							</h:column>
							<h:outputText value=""/>
						</h:panelGrid>
					</p:tab>
				</p:tabView>
				<h:outputLink value="manutencao.jsf">
					<h:graphicImage url="/images/botoes/btnPesquisar.png" class="btnAcoes"/>
				</h:outputLink>	
				<h:commandLink action="#{controleTipoVeiculo.limpar}">
					<h:graphicImage url="/images/botoes/btnLimpar.png" class="btnAcoes"/>
					<f:ajax render="divTabView"/>
				</h:commandLink>
				<h:commandLink action="#{controleTipoVeiculo.gravar}" styleClass="alinhaDir">
					<h:graphicImage url="/images/botoes/btnGravar.png" class="btnAcoes"/>
				</h:commandLink>
			</h:form>
		</ui:define>
	</ui:composition>
</html>